var Session = {};

/**
 * @type {Tree}
 * @static
 */
Session.tree = null;

/**
 * The current set
 * @type {Set}
 * @static
 */
Session.set = null;

/**
 * The current photo
 * @type {Photo}
 * @static
 */
Session.photo = null;

/**
 * Assign current set and photo
 * @param {Set} set
 */
Session.updateSet = function(set)
{
	"use strict";

	Session.set = set;
	Session.photo = set.currentPhoto();
};

/**
 * If photo is given make it current otherwise use set's current photo
 * @param {Photo} [photo]
 */
Session.updatePhoto = function(photo)
{
	"use strict";

	if (photo)
	{
		Session.photo = photo;

		if (Session.set) { Session.set.makeCurrentPhoto(photo); }
	}
	else if (Session.set)
	{
		Session.photo = Session.set.currentPhoto();
	}
};
